//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using CommunityServer.Components;

namespace CommunityServer.ControlPanel.UI
{
	/// <summary>
	/// Summary description for BaseGalleryAdminPage.
	/// </summary>
	public class  BaseGalleryAdminPage : PanelPage
	{
		public  BaseGalleryAdminPage()
		{
		}

		protected override void Authorize()
		{
			base.Authorize ();

			User currentUser = CSContext.Current.User;
			if(!currentUser.IsGalleryAdministrator)
			{
			    if(currentUser.IsAnonymous)
                    Response.Redirect(Globals.GetSiteUrls().Login);
                else
                    throw new CSException(CSExceptionType.AccessDenied);
			}

            SetLocation();
		}

  

	}
}
